//package com.xbongbong.paas.service.dynamic.crm.strategy.impl;
//
//import com.xbongbong.paas.domain.entity.PaasFormDataEntity;
//import com.xbongbong.paas.pojo.dto.SaasFormSaveDTO;
//import com.xbongbong.paas.service.dynamic.crm.strategy.AbstractDynamicStrategy;
//import com.xbongbong.parent.interfaces.DynamicStrategy;
//import com.xbongbong.pro.dynamic.pojo.dto.DynamicDeleteDTO;
//import com.xbongbong.pro.dynamic.pojo.dto.DynamicRefInfoDTO;
//import com.xbongbong.pro.dynamic.pojo.dto.DynamicSaveDTO;
//import com.xbongbong.saas.enums.ProjectLogEnum;
//import com.xbongbong.saas.enums.XbbRefTypeEnum;
//import com.xbongbong.saas.enums.business.ContractEnum;
//import com.xbongbong.saas.enums.business.OrderEnum;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.scheduling.annotation.Async;
//
//import java.util.Arrays;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
///**
// *订货单: 经销商，暂不考虑
// *
// *@author weijianxun
// */
//// @Service("orderDynamicStrategyImpl")
//public class OrderDynamicStrategyImpl extends AbstractDynamicStrategy implements DynamicStrategy {
//
//    private final Logger LOG = LoggerFactory.getLogger(OrderDynamicStrategyImpl.class);
//
//    private static final Map<String, Integer> refTextToLogTypeMap = new HashMap<>();
//
//    static {
//        refTextToLogTypeMap.put(OrderEnum.LINK_DISTRIBUTOR.getAttr(), ProjectLogEnum.CUSTOMER_REF.getSubType());
//    }
//
//    @Override
//    public List<Integer> type() {
//        return Arrays.asList(XbbRefTypeEnum.ORDER.getCode());
//    }
//
//    @Override
//    @Async("dynamicThreadPool")
//    public void save(DynamicSaveDTO dynamicSaveDTO) {
//        try {
//            SaasFormSaveDTO saasFormSaveDTO = dynamicSaveDTO.getSaasFormSaveDTO();
//            PaasFormDataEntity newPaasFormDataEntity = saasFormSaveDTO.getNewPaasFormDataEntity();
//            super.saveRefUpDynamic(dynamicSaveDTO, refTextToLogTypeMap, null,
//                    DynamicRefInfoDTO.initDynamicRefInfoDTO(dynamicSaveDTO.getDataId(), saasFormSaveDTO.getBusinessType(), newPaasFormDataEntity.getSerialNo()), ProjectLogEnum.ORDER_CREATE.getSubType());
//        } catch (Exception e) {
//            LOG.error("com.xbongbong.paas.service.dynamic.crm.strategy.impl.OrderDynamicStrategyImpl.save", e);
//        }
//    }
//    @Override
//    @Async("dynamicThreadPool")
//    public void batchDelete(DynamicDeleteDTO dynamicDeleteDTO) {
//        try {
//            super.batchRefSaveUpDynamicByDeleteBatch(dynamicDeleteDTO, refTextToLogTypeMap, null, ContractEnum.CONTRACT_NO.getAttr(), ProjectLogEnum.ORDER_DELETE.getSubType());
//        } catch (Exception e) {
//            LOG.error("com.xbongbong.paas.service.dynamic.crm.strategy.impl.OrderDynamicStrategyImpl.batchDelete", e);
//        }
//    }
//}
